<html  lang="cn" xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<title>村委信箱</title>
	<script type="text/javascript" th:src="@{/js/Assets/jquery-1.8.3.min.js}"></script>
<link rel="stylesheet" type="text/css" th:href="@{/css/Assets/reset.css}"/>
<link rel="stylesheet" type="text/css" th:href="@{/css/reset.css}"/>
<script type="text/javascript" th:src="@{/js/Assets/js_z.js}"></script>
<link rel="stylesheet" type="text/css" th:href="@{/css/Assets/thems.css}">
<link rel="stylesheet" type="text/css" th:href="@{/css/Assets/responsive.css}">
<script type="text/javascript" th:src="@{/js/shiro.js}"></script>
<script type="text/javascript">shiro.baseUrl = '[[@{/}]]'; </script>
<script type="text/javascript" th:src="@{/js/libs/layer/layer.js}"></script>
<link rel="stylesheet" th:href="@{/css/layer/layer.css}" id="layui_layer_skinlayercss">
<style>
		
		form{
			padding-left:200px
		}
		.tr{
			min-width: 200px;
			max-width: 600px;
			margin-top: 20px;
			margin-bottom:20px
		}
		.tr lable{
			display: flex;
			align-items: top;
		}
		.tr lable span{
			width:70px;
			line-height: 40px;
			font-size: 16px;
			font-weight: bold;
		}
		.tr lable input{
			flex: 1;
			height:40px;
			border: 1px solid #E8E8E8;
			border-radius:10px;
			font-size: 16px;
			text-indent: 24px;
		}
		.tr lable textarea{
			flex: 1;
			height:120px;
			border: 1px solid #E8E8E8;
			border-radius:10px;
			font-size: 16px;
			text-indent: 24px;
			resize:none
		}
		input[type="button"]{
			width:200px;
			height: 40px;
			display: block;
			margin:0 auto;
			border: none;
			background: #0073BC;
			color:#fff;
			font-size:16px;
			border-radius:6px;
		}
		.head .nav .hover:hover a{
			background:#D9D9D9;
			color:#000;
		}
	</style>
</head>
<body>
<!--头部-->
<div class="header">
    <div class="head clearfix">
        <div class="logo"><img th:src="@{/images/Assets/logo.png}" alt=""/></div>
        <div class="nav_m">
            <div class="n_icon">导航栏</div>
            <ul class="nav clearfix">
                <li><a th:href="@{/client/index/main}">首页</a></li>
                <li><a th:href="@{/client/town/list}">新农村</a></li>
                <li><a th:href="@{/client/goods/list}">一村一品</a></li>
                <li><a th:href="@{/client/hotel/list}">休闲农庄</a></li>
                <li><a th:href="@{/client/insurance/list}">农牧保险</a></li>
                <li  class="now"><a th:href="@{/client/suggestion/list}">村委信箱</a></li>
                <li  th:if="${telphone==null || telphone=='' ||session.TOWN_SESSION_USER_TYPE =='ADMIN'}" >
                	<a th:href="'javascript:login();'">登录/注册</a>
                </li>
                <li class="hover" th:if="${telphone!=null && telphone!='' && session.TOWN_SESSION_USER_TYPE =='CLIENT' }"  >
                	<a  th:text="${telphone}"></a>
                </li>
                <li th:if="${telphone!=null && telphone!='' && session.TOWN_SESSION_USER_TYPE =='CLIENT'}">
                	<a th:href="'javascript:loginOut();'">退出</a>
                </li>
            </ul>
        </div>
    </div>
</div>
<!--头部-->
<!--幻灯片-->
<div class="banner banner_s"><img th:src="@{/images/upload/banner_a.jpg}" alt=""/></div>
<!--幻灯片-->
<div class="space_hx">&nbsp;</div>
<div class="scd clearfix">
	<div class="scd_l">
    	<div class="name">
        	村委信箱
            <p>Mailbox</p>
        </div>
    </div>
    <div class="scd_r">
    	<div class="pst">
        	您当前的位置：
            <a href="">首页</a>>
            <a href="">村委信箱</a>
        </div>
        <div class="scd_m">
        	<div class="about">
                <form id="form-suggestion">
                <input type="hidden" id="telphone" th:value="${telphone}">
					<div class="tr">
						<lable><span>标题：</span>
							<input type="text"  name="title" id="title"/>
						</lable>
					</div>
					<div class="tr">
						<lable><span>内容：</span>
							<textarea cols="30" rows="10" name="content" id="content"></textarea>
						</lable>
					</div>
					<div class="tr">
						<lable><span>姓名：</span>
							<input type="text" name="publishUserName" id="publishUserName"/>
						</lable>
					</div>
					<div class="tr">
						<lable><span>邮箱：</span>
							<input type="text" name="email" id="email"/>
						</lable>
					</div>
					<div class="tr">
						<input type="button"  value="提交" onclick="addSuggestion()"/>
					</div>
				</form>
            </div>
        </div>
    </div>
</div>
<div class="space_hx">&nbsp;</div>
<div class="f_bg">
	<div class="foot">
    	<p>增值电信业务经营许可证 粤B-2-4-20100005  粤ICP备 05012706号   版权所有：深圳市正海实业有限公司 客服电话400-6666-8888</p>
        <p>Copyright © 2015 www.zhenghaishiye.com. All Rights Reserved</p>
    </div>
</div>
<script type="text/javascript">
	function login(){
		layer.open({
			type: 2,
			shadeClose :true,
			offset: ['100px'],
			area: ['402px', '290px'],
			title: false,
			content: [shiro.baseUrl + '/client/login/tologin','no'],
			success: function(layero) {
                layero.css('overflow', 'hidden	');
            }
		});
	}
</script>
<script type="text/javascript">
	function addSuggestion(){
		alert("aa");
		var telphone = $.trim($("#telphone").val());
		var title = $.trim($("#title").val());
		var content = $.trim($("#content").val());
		var publishUserName = $.trim($("#publishUserName").val());
		var email = $.trim($("#email").val());
		if(telphone!=null&&telphone!=""){
			if(title!=null&&title!=""){
				if(content!=null&&content!=""){
					if(publishUserName!=null&&publishUserName!=""){
						shiro.ajax({
				 			url: '/client/suggestion/addSuggestion',
				 			data:{"title":title,"content":content,"publishUserName":publishUserName,"email":email},
				 			success: function(data) {
				 				if(data.result == 0) {
				 					layer.msg("您的信息已提交后台人员处理!", {time: 1500});
				 					window.location.href = shiro.baseUrl + '/client/index/main';
				 				} else {
				 					layer.msg(data.message, {time: 1500});
				 					$('#title').focus();
				 				}
				 			}
				 		});
					}else{
						layer.msg('名字不能为空');
					}
				}else{
					layer.msg('内容不能为空');
				}
			}else{
				layer.msg('标题不能为空');
			}
		}else{
			layer.msg('请先登录');
		}
	}
	function loginOut(){
		layer.msg('确定退出登录？', {
	        time: 0,
	        offset: ['250px'],
	        btn: ['确定', '取消'],
	        yes: function(index){
	            layer.close(index);
	            window.location.href = shiro.baseUrl + "/client/login/loginOut";
	        }
	    });
	}
</script>
</body>
</html>
